<template>
  <div>
    <div class="headerImg" @click="loginDialog">
      <span v-show='false'>登录</span>
      <img src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png" alt="">
    </div>
    <login-out @closeLogin="closeLogin" :loginShow="loginShow"></login-out>
  </div>
</template>

<script>
import loginOut from "@/share/alter/loginOut";
export default {
  components: {
    loginOut
  },

  data() {
    return {
      loginShow: 0 //父子组件传值
    };
  },
  methods: {
    /*登陆*/
    loginDialog() {
      //子传父
      this.loginShow = 1;
    },
    closeLogin(msg) {
      console.log(msg);
      this.loginShow = msg;
    }
  }
};
</script>

<style lang="less" scoped>
.headerImg {
  width: 60px;
  img{
    width: 40px;
    height: 40px;
    border-radius: 25px;
    margin-top: 8px;
  }
}
.el-avatar {
  display: inline-block
}
</style>